<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->get('/', 'Home::index');
$routes->get('selection', 'Selection::index');
$routes->post('/selection/submit', 'Selection::submit');
$routes->get('dashboard', 'Dashboard::index');
$routes->get('/search', 'Search::index');
$routes->get('yanxue/(:any)', 'Page::locationDetail/$1');
$routes->post('yanxue/set_keyword', 'Yanxue::set_keyword');
$routes->post('yanxue/set_link', 'Yanxue::set_link');
$routes->post('yanxue/remove_keyword', 'Yanxue::remove_keyword');
$routes->post('yanxue/remove_link', 'Yanxue::remove_link');
$routes->get('feature/', 'Feature::index');
$routes->post('feature/set_feature', 'Feature::set_feature');
$routes->post('feature/clear_page_links', 'Feature::clear_page_links');
$routes->post('feature/clear_activity_logs', 'Feature::clear_activity_logs');
$routes->get('page_links', 'PageLink::index');
$routes->get('page-links/export-csv', 'PageLink::exportCsv');

// 添加记录活动的路由
$routes->post('/record-stay-activity/', 'UserActivityLog::recordStayActivity');
$routes->post('/record-click-activity/', 'UserActivityLog::recordClickActivity');
$routes->get('/record-activity/', 'UserActivityLog::index');
$routes->get('/record-activity/export-click-csv', 'UserActivityLog::exportClickCsv');
$routes->get('/record-activity/export-stay-csv', 'UserActivityLog::exportStayCsv');
